#ifndef CAPACITOR_H
#define CAPACITOR_H

class capacitor
{
public:
    capacitor(double c_value, double c_error, double c_voltage);
    capacitor(double c_value, double c_error, double c_voltage, double c_tcr, double c_acr);

    void set_value(double val);
    void set_error(double err);
    void set_withstand_vol(double v);
    void set_tcr(double c_tcr);
    void set_acr(double c_acr);

    double get_max_value(double max_work_temperature, double max_work_life);
    double get_min_value(double max_work_temperature, double max_work_life);

    ~capacitor();


private:
    double value;             // 容值
    double error;             // 精度
    double withstand_voltage; // 耐压值（V）
    double tcr;               // 温度系数（PPM）
    double acr;               // 老化系数
};


#endif // CAPACITOR_H
